export default {
  /**
   * 设备综合管理涉及的接口-----------------------------------------------------------------------------
   *
   */

  /**
   * 02100001---设备综合列表
   * /device/deviceinfo/list
   * @param  {number}  currentPage           当前页
   * @param  {number}  pageSize              每页显示数量
   * @param  {string}  devName               设备名称
   * @param  {string}  devType               设备类型
   * @param  {string}  status                设备状态0'全部',1'正常',2'故障',3'待修', 4'维修中', 5'待保养',6'闲置',7'报废'
   * @param  {string}  maintenanceId         维保单位
   * @param  {string}  districtId            安装区域
   * @param  {string}  pointId               安装点位
   * @param  {string}  adminUserId           设备管理员
   *
   */
  "POST /device/deviceinfo/list": (req, res) => {
    res.send({
      trace_id: "15d9733dc1fe4072005ac112a01717a",
      request_id: "15d9733dc1fe4772002ac112a01715c",
      error_info: "执行成功",
      error_no: "0",
      data: {
        pagination: {
          current: 1,
          pageSize: 30,
          total: 40
        },
        list: [
          {
            devId: "001",
            devCode: "002",
            devName: "网络摄像头",
            devModel: "H002",// 找不到
            status: "07",
            trademark: "海康威视",
            supplier: "海康威视",
            maintenanceName: "杭州XXX",
            adminUserName: "张三",
          },
          {
            devId: "002",
            devCode: "002",
            devName: "网络摄像头1",
            devModel: "H005",
            status: "09",
            trademark: "海康威视",
            supplier: "海康威视",
            maintenanceName: "杭州XXX",
            adminUserName: "李四",
          },
          {
            devId: "009",
            devCode: "002",
            devName: "网络摄像头",
            devModel: "H002",// 找不到
            status: "02",
            trademark: "海康威视",
            supplier: "海康威视",
            maintenanceName: "杭州XXX",
            adminUserName: "张三",
          },
          {
            devId: "0010",
            devCode: "002",
            devName: "网络摄像头1",
            devModel: "H005",
            status: "04",
            trademark: "海康威视",
            supplier: "海康威视",
            maintenanceName: "杭州XXX",
            adminUserName: "李四",
          },
          {
            devId: "003",
            devCode: "002",
            devName: "网络摄像头",
            devModel: "H002",// 找不到
            status: "05",
            trademark: "海康威视",
            supplier: "海康威视",
            maintenanceName: "杭州XXX",
            adminUserName: "张三",
          },
          {
            devId: "004",
            devCode: "002",
            devName: "网络摄像头1",
            devModel: "H005",
            status: "06",
            trademark: "海康威视",
            supplier: "海康威视",
            maintenanceName: "杭州XXX",
            adminUserName: "李四",
          },
          {
            devId: "005",
            devCode: "002",
            devName: "网络摄像头",
            devModel: "H002",// 找不到
            status: "06",
            trademark: "海康威视",
            supplier: "海康威视",
            maintenanceName: "杭州XXX",
            adminUserName: "张三",
          },
          {
            devId: "006",
            devCode: "002",
            devName: "网络摄像头1",
            devModel: "H005",
            status: "04",
            trademark: "海康威视",
            supplier: "海康威视",
            maintenanceName: "杭州XXX",
            adminUserName: "李四",
          },
          {
            devId: "007",
            devCode: "002",
            devName: "网络摄像头",
            devModel: "H002",// 找不到
            status: "01",
            trademark: "海康威视",
            supplier: "海康威视",
            maintenanceName: "杭州XXX",
            adminUserName: "张三",
          },
          {
            devId: "008",
            devCode: "002",
            devName: "网络摄像头1",
            devModel: "H005",
            status: "01",
            trademark: "海康威视",
            supplier: "海康威视",
            maintenanceName: "杭州XXX",
            adminUserName: "李四",
          }
        ]
      }
    });
  },


  /**
   * 02100002---添加设备
   * /device/deviceinfo/save
   * @param  {string}  devName              设备名称
   * @param  {string}  devType              设备类型
   * @param  {string}  devModel             设备型号
   * @param  {string}  devParam             参数
   * @param  {string}  trademark            品牌
   * @param  {string}  supplier             供货商
   * @param  {number}  enableDate           启用日期
   * @param  {string}  maintainPeriod       保养周期
   * @param  {string}  devLife              设备寿命
   * @param  {string}  devCode              设备编号
   * @param  {string}  rfidCode             RFID编号
   * @param  {string}  maintenanceId        维保单位
   * @param  {string}  maintainLinkman      维保联系人(废弃)
   * @param  {string}  maintainPhone        维保电话(废弃)
   * @param  {string}  adminUserId          设备管理员
   * @param  {array}   assodevId            关联设备id
   * @param  {string}  deviceAttachment     附属备件
   * @param  {string}  districtId           安装区域ID
   * @param  {string}  pointId              安装点位ID
   * @param  {string}  remarks              备注
   * @param  {string}  devPhoto             设备图片
   * @param  {array}   devDatum             设备资料（支持多个文件上传，存储为数组）
   */
  "POST /device/deviceinfo/save": (req, res) => {
    res.send({
      trace_id: "15d9733dc1fe4072005ac112a01717a",
      request_id: "15d9733dc1fe4772002ac112a01715c",
      error_info: "执行成功",
      error_no: "0"
    });
  },


  /**
   * 02100003---修改设备
   * /device/deviceinfo/update
   * @param  {string}  devId               设备记录id
   * @param  {string}  devName             设备名称
   * @param  {number}  devType             设备类型
   * @param  {string}  devModel            设备型号
   * @param  {string}  devParam            参数
   * @param  {string}  trademark           品牌
   * @param  {string}  supplier            供货商
   * @param  {number}  enableDate          启用日期
   * @param  {string}  maintainPeriod      保养周期
   * @param  {string}  devLife             设备寿命
   * @param  {string}  devCode             设备编号
   * @param  {string}  rfidCode            RFID编号
   * @param  {number}  maintenanceId       维保单位
   * @param  {string}  maintainLinkman     维保联系人(废弃)
   * @param  {string}  maintainPhone       维保电话(废弃)
   * @param  {string}  adminUserId         设备管理员
   * @param  {array}   assodevId           关联设备id
   * @param  {string}  deviceAttachment    附属备件
   * @param  {string}  districtId          安装区域ID
   * @param  {string}  pointId             安装点位ID
   * @param  {string}  remarks             备注
   * @param  {string}  devPhoto            设备图片
   * @param  {array}   devDatum            设备资料
   */
  "POST /device/deviceinfo/update": (req, res) => {
    res.send({
      trace_id: "15d9733dc1fe4072005ac112a01717a",
      request_id: "15d9733dc1fe4772002ac112a01715c",
      error_info: "执行成功",
      error_no: "0"
    });
  },


  /**
   * 02100004---获取单个设备信息
   * /device/deviceinfo/info/{id}
   * @param  {string}  devId          设备记录id
   */
  "POST /device/deviceinfo/info": (req, res) => {
    res.send({
      trace_id: "15d9733dc1fe4072005ac112a01717a",
      request_id: "15d9733dc1fe4772002ac112a01715c",
      error_info: "执行成功",
      error_no: "0",
      data:{
        devId:"1",
        devName:"网络摄像头",
        status: "01",
        devType:"1",
        devTypeName:"海康威视",
        devModel:"H001",
        devParam:"16",
        trademark:"海康威视",
        supplier:"海康威视",
        enableDate:1515554892000,
        maintainPeriod:"12个月",
        pointName:"具体点位名称",
        devLife:"1",
        devLifeName:"1年",
        devCode:"1000",
        rfidCode:"1000",
        maintenanceId:"1",
        maintenanceName:"杭州海康",
        linkman:"磐石雨",
        phone:"0571-12345678",
        adminUserId:"1",
        adminUserName:"张三",
        assodev:[
          {
            devId:"1",
            devName:"备件1"
          },
          {
            devId:"2",
            devName:"备件2"
          }
        ],
        maintainLine:[
          {lineId:"1",lineName:"线路1"},
          {lineId:"2",lineName:"线路2"}
        ],
        deviceAttachment:[
          {
            id:"1",
            attaName:"备件1"
          },
          {
            id:"2",
            attaName:"备件2"
          }
        ],
        remarks:"XXXX",
        devPhoto:{
          uid: 'I100000000113',
          name: '211841154.jpg',
          url: 'http://www.qqzhi.com/uploadpic/2015-02-02/211841154.jpg',
        },
        devDatum:[{
          uid: 'I100000000114',
          name: '2bb91d50f8b681a4e38370f2c94a2983.doc',
          url: 'http://dytdev.oss-cn-hangzhou.aliyuncs.com/upim-incubator/100000/project/10000000000014/20180409164543-2ab91d50f8b681a4e38370f2c94a2983.doc',
        },{
          uid: 'I100000000115',
          name: '2ab91d50f8b681a4e38370f2c94a2983.xls',
          url: 'http://dytdev.oss-cn-hangzhou.aliyuncs.com/upim-incubator/100000/project/10000000000014/20180409164543-2ab91d50f8b681a4e38370f2c94a2983.xls',
        }]
      },

    });
  },


  /**
   * 021000051---设备加入白名单（单个）批量操作
   * /device/deviceinfo/setWhiteName
   * @param  {arryay}  devIds              设备记录id，支持多个
   * @param  {string}  reason              原因
   */
  "POST /device/deviceinfo/setWhiteName": (req, res) => {
    res.send({
      trace_id: "15d9733dc1fe4072005ac112a01717a",
      request_id: "15d9733dc1fe4772002ac112a01715c",
      error_info: "执行成功",
      error_no: "0"
    });
  },


  /**
   * 021000054---设备取消白名单
   * /device/deviceinfo/cancelWhiteName
   * @param  {string}  devId              设备记录id
   */
  "POST /device/deviceinfo/cancelWhiteName": (req, res) => {
    res.send({
      trace_id: "15d9733dc1fe4072005ac112a01717a",
      request_id: "15d9733dc1fe4772002ac112a01715c",
      error_info: "执行成功",
      error_no: "0"
    });
  },




  /**
   * 021000052---设备报废（单个）批量操作
   * /device/deviceinfo/setDevInvalid
   * @param  {arryay}  devIds              设备记录id，支持多个
   */
  "POST /device/deviceinfo/setDevInvalid": (req, res) => {
    res.send({
      trace_id: "15d9733dc1fe4072005ac112a01717a",
      request_id: "15d9733dc1fe4772002ac112a01715c",
      error_info: "执行成功",
      error_no: "0"
    });
  },


  /**
   * 021000053---设备删除（单个）批量操作
   * /device/deviceinfo/delete
   * @param  {arryay}  devIds              设备记录id，支持多个
   */
  "POST /device/deviceinfo/delete": (req, res) => {
    res.send({
      trace_id: "15d9733dc1fe4072005ac112a01717a",
      request_id: "15d9733dc1fe4772002ac112a01715c",
      error_info: "执行成功",
      error_no: "0"
    });
  },






  /**
   * 02100007---设备（单个）批量导出
   * @param  {array}   devIds        设备记录id
   */
  "POST /02100007": (req, res) => {
    res.send({
      trace_id: "15d9733dc1fe4072005ac112a01717a",
      request_id: "15d9733dc1fe4772002ac112a01715c",
      error_info: "执行成功",
      error_no: "0"
    });
  },


  /**
   * 02100008---设备（单个）批量导入
   * @param  {string}   file_url    上传到服务器的文件路径（上传接口统一调用公用的，得到文件路径后回传）
   */
  "POST /02100008": (req, res) => {
    res.send({
      trace_id: "15d9733dc1fe4072005ac112a01717a",
      request_id: "15d9733dc1fe4772002ac112a01715c",
      error_info: "执行成功",
      error_no: "0"
    });
  },


  /**
   * 02100009---单个设备维修记录查询
   * /repair/repairinfo/queryDevRepairList
   * @param  {number}  currentPage           当前页
   * @param  {number}  pageSize              每页显示数量
   * @param  {string}  devId    设备id
   */
  "POST /repair/repairinfo/queryDevRepairList": (req, res) => {
    res.send({
      trace_id: "15d9733dc1fe4072005ac112a01717a",
      request_id: "15d9733dc1fe4772002ac112a01715c",
      error_info: "执行成功",
      error_no: "0",
      data:{
        pagination: {
          current: 1,
          pageSize: 30,
          total: 40
        },
        list:[{
          repairId:"1",
          status:1,
          repairNum: "003434343",
          createTime: 1515554892000,
          devCode:"1000",
          devName:"网络摄像头",
          maintenanceName:"杭州海康",
        },{
          repairId:"2",
          status:2,
          repairNum: "0034343431",
          createTime: 1515554892000,
          devCode:"1000",
          devName:"网络摄像头2",
          maintenanceName:"杭州海康1",
        }]
      }
    });
  },



  /**
   * 02100010---单个设备养护记录查询
   * /maintain/maintaintask/queryTaskDevsByDevId
   * @param  {number}  currentPage           当前页
   * @param  {number}  pageSize              每页显示数量
   * @param  {string}  devId    设备id
   */
  "POST /maintain/maintaintask/queryTaskDevsByDevId": (req, res) => {
    res.send({
      trace_id: "15d9733dc1fe4072005ac112a01717a",
      request_id: "15d9733dc1fe4772002ac112a01715c",
      error_info: "执行成功",
      error_no: "0",
      data:{
        pagination: {
          current: 1,
          pageSize: 30,
          total: 40
        },
        list:[{
          taskId:"1",
          status:1,
          taskCode: "003434343",
          beginTime: 1515554892000,
          endTime: 1515554892000,
          devCode:"1000",
          devName:"网络摄像头",
          maintenanceName:"杭州海康",
        },{
          taskId:"2",
          status:2,
          taskCode: "003434343",
          beginTime: 1515554892000,
          endTime: 1515554892000,
          devCode:"1000",
          devName:"网络摄像头2",
          maintenanceName:"杭州海康",
        }]
      }
    });
  },

  /**
   * 02100011---单个设备操作日志
   * /device/deviceolog/list
   * @param  {number}  currentPage           当前页
   * @param  {number}  pageSize              每页显示数量
   * @param  {string}  devId    设备id
   */
  "POST /device/deviceolog/list": (req, res) => {
    res.send({
      trace_id: "15d9733dc1fe4072005ac112a01717a",
      request_id: "15d9733dc1fe4772002ac112a01715c",
      error_info: "执行成功",
      error_no: "0",
      data:{
        pagination: {
          current: 1,
          pageSize: 30,
          total: 40
        },
        list:[{
          logId:"1",
          createTime: 1515554892000,
          username:"操作员1",
          ologCon:"日志内容",
          ip:"10.0.2.34",
        },{
          logId:"2",
          createTime: 1515554892000,
          username:"操作员1",
          ologCon:"日志内容",
          ip:"10.0.2.34",
        }]
      }
    });
  },




  /**
   * 02100013---养护点（设备）列表
   * /device/deviceinfo
   * @param  {number}  currentPage           当前页
   * @param  {number}  pageSize              每页显示数量
   * @param  {string}  devName               设备名称
   * @param  {string}  devType               设备类型
   * @param  {string}  maintenanceId         维保单位(必传)
   * @param  {string}  districtId            安装区域
   * @param  {string}  pointId               安装点位
   *
   */
  getCuringList(req, res) {
    res.send({
      trace_id: "15d9733dc1fe4072005ac112a01717a",
      request_id: "15d9733dc1fe4772002ac112a01715c",
      error_info: "执行成功",
      error_no: "0",
      data: {
        pagination: {
          current: 1,
          pageSize: 30,
          total: 40
        },
        list: [
          {
            devId: "001",
            devCode: "001",
            devName: "网络摄像头1",
            districtName: "滨江区",
            pointName: "具体点位",
            signTime:1515554892000
          },{
            devId: "002",
            devCode: "002",
            devName: "网络摄像头3",
            districtName: "滨江区",
            pointName: "具体点位",
            signTime:1515554892000
          },
          {
            devId: "003",
            devCode: "003",
            devName: "网络摄像头3",
            pointName: "具体点位3",
            districtName: "滨江区",
            signTime:1515554892000
          },
          {
            devId: "004",
            devCode: "004",
            devName: "网络摄像头3",
            pointName: "具体点位4",
            districtName: "滨江区",
            signTime:1515554892000
          },
          {
            devId: "005",
            devCode: "005",
            devName: "网络摄像头3",
            pointName: "具体点位5",
            districtName: "滨江区",
            signTime:1515554892000
          }
        ]
      }
    });
  },


};
